package code.example.base.temp;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import java.util.SimpleTimeZone;

public class TestDateFormat {
    public static void main(String [] args){
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss SSS");
        String str = "2018-01-01 10:10:10 342";
        try {
            Date date = sdf.parse(str);
            System.out.println(sdf.format(date));
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
